{
  "properties" : { },
  "id" : "5bbc991ad3a445958961d20daa63bb69",
  "script" : null,
  "groupId" : "5affd458495e4bf8a43e1f578f0ce3a9",
  "name" : "批量确认实时告警",
  "createTime" : 1727070952592,
  "updateTime" : 1726306126957,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "confirm",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\n    \"id\":\"7910263708800448805\"\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 500,\n    \"success\": false,\n    \"data\": {},\n    \"msg\": \"系统维护中，请稍后重试。\"\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
import java.time.LocalDateTime;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import java.time.Instant;

    split = body.id.split(",");

    for (item in split) {
        alarmInfo = db.selectOne(""" select * from alarm_info where id = #{item} """)
        LocalDateTime confirmTime = LocalDateTime.now();
        String nickName = AuthUtil.getNickName();
        recoveryTime = alarmInfo.recoveryTime
        if (alarmInfo != null ){
            var entity = {
                "alarm_target":alarmInfo.alarmTarget,
                "alarm_rule_id":alarmInfo.alarmRuleId,
                "alarm_time":(alarmInfo.alarmTime).toLocalDateTime(),
                "first_alarm_time":(alarmInfo.firstAlarmTime).toLocalDateTime(),
                "alarm_content":alarmInfo.alarmContent,
                "alarm_count":alarmInfo.alarmCount,
                "is_recovery":alarmInfo.isRecovery,
                "recovery_time":recoveryTime == null ? null : recoveryTime.toLocalDateTime(),
                "confirm_time":confirmTime,
                "entity":alarmInfo.entity
            }
            db.update(""" delete from alarm_info where id = #{item} """)
            db.table("ALARM_INFO_HISTORY").primary("id",IdUtil.getSnowflakeNextId()).save(entity)
        }
    }
    return true;